package com.zbkj.crmeb.chant.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class AddActivityRequest implements Serializable {

    @ApiModelProperty(value = "活动名称")
    @NotBlank(message = "活动名称不能为空")
    private String name;

    @ApiModelProperty(value = "活动标识")
    private String mark;

    @ApiModelProperty(value = "活动开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "活动结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "banner图最多9张")
    @NotBlank(message = "banner图不能为空")
    private String image;

    @ApiModelProperty(value = "适用人群（1 所有 2 无订单用户 3 新用户,4会员用户）")
    private Integer crowd;

    @ApiModelProperty(value = "限购数量（0不限量）")
    @NotNull(message = "限购数量不能为空")
    private Integer limitTotal;

    @ApiModelProperty(value = "超出限购（0无法购买 1售价购买）")
    private Integer limited;

    @ApiModelProperty(value = "是否预热（1立即预热  2选择预热  3不预热）")
    @NotNull(message = "是否预热不能为空")
    private Integer preheating;

    @ApiModelProperty(value = "预热开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date preheatingStartTime;

    @ApiModelProperty(value = "预热结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date preheatingEndTime;

    @ApiModelProperty(value = "预热期间是否购买(0不可购买  1按照售价购买  )")
    private Integer preheatingBuy;

    @ApiModelProperty(value = "活动说明")
    private String description;

    @ApiModelProperty(value = "活动结束商品状态（0恢复售价  1自动下架）")
    private Integer productStatus;

    @ApiModelProperty(value = "商户id",hidden = true)
    private Integer merId;

}